/**
 * Created by wangzhuoya on 2017/6/15.
 */
function openPartialLayer(obj) {
	console.log(obj)
    var eheight = $(obj).css("height");//元素带px的高宽度
    var ewidth = $(obj).css("width");
    var top = $(obj).offset().top; // 元素在文档中位置 滚动条不影响
    var left = $(obj).offset().left;
    var layer = $("<div class='loadingMask'><div class='dataLoading'><i></i><i></i><span>加载中...</span></div></div></div>");
    //var layer = $("<div class='loading_overlay'><div class='loading'><span></span><span></span><span></span><span></span><span></span></div>");
    layer.css({
        style: 'z-index:9',
        position: "fixed",
        height: eheight,
        width: ewidth,
        background: "#ffffff",
        top: top,
        left: left,
        opacity: 0.6
    });
    $(obj).append(layer);
    return this;
};


function removeLoading(obj){
    $(obj).find(".loadingMask").remove();
    //$(obj).find(".loading_overlay").remove();
}

$(document).ready(function(){
    $(window).resize(function() {
        $(".loadingMask").each(function(){
            $(this).css("height",$(this).parent().css("height"));
            $(this).css("width",$(this).parent().css("width"));
            $(this).css("left",$(this).parent().offset().left);
            $(this).css("top",$(this).parent().offset().top);
        })
    });
});